import request from '@/utils/request'

export function getList(params) {
  return request({
    url: '/api/user/getUserList?pageNum=1&pageSize=10&name=2',
    method: 'get',
    params
  })
}
export function getUserList(params) {
  return request({
    url: '/api/user/getUserList',
    method: 'get',
    params
  })
}
export function updateUser(data) {
  return request({
    url: '/api/user/updateUserById',
    method: 'post',
    data
  })
}
export function deletedUser(data) {
  return request({
    url: '/api/user/deleteUserById',
    method: 'post',
    data
  })
}

export function getClassList(params) {
  return request({
    url: '/api/sysClass/getSysClassList',
    method: 'get',
    params
  })
}
export function getClassInfo(params) {
  return request({
    url: '/api/joinClass/selectStudent',
    method: 'get',
    params
  })
}
export function getStudentJoinClass(params) {
  return request({
    url: '/api/joinClass/getStudentJoinClass',
    method: 'get',
    params
  })
}
export function deleteSysClass(data) {
  return request({
    url: '/api/sysClass/deleteSysClass',
    method: 'post',
    data
  })
}
export function getPleaseLeaveList(params) {
  return request({
    url: '/api/pleaseLeave/getPleaseLeaveList',
    method: 'get',
    params
  })
}
export function getPleaseLeave(params) {
  return request({
    url: '/api/pleaseLeave/getPleaseLeave',
    method: 'get',
    params
  })
}
export function deletePleaseLeave(data) {
  return request({
    url: '/api/pleaseLeave/deletePleaseLeave',
    method: 'post',
    data
  })
}

export function updateStatus(params) {
  return request({
    url: '/api/pleaseLeave/updateStatus',
    method: 'get',
    params
  })
}

export function getStudentClockListPage(params) {
  return request({
    url: '/api/sysClass/getStudentClockListPage',
    method: 'get',
    params
  })
}
export function deleteStudentClock(data) {
  return request({
    url: '/api/sysClass/deleteStudentClock',
    method: 'post',
    data
  })
}

// 创建公告
export function createAnnouncement(data) {
  return request({
    url: '/api/announcement/create',
    method: 'post',
    data
  })
}

// 更新公告
export function updateAnnouncement(data) {
  return request({
    url: '/api/announcement/update',
    method: 'post',
    data
  })
}

// 删除公告
export function deleteAnnouncement(data) {
  return request({
    url: '/api/announcement/delete',
    method: 'post',
    data
  })
}